<?php

namespace App\B2BProject\Custom\Business;

use Illuminate\Database\Eloquent\Model;

/**
 * Class ProviderAuthorization
 *
 * 授权书模型。用于供应商注册时可能需要添加多个授权书而设立的单独模型，和店铺关联
 *
 * @package App\B2BProject\Custom\Business
 */
class ProviderAuthorization extends Model
{
    protected $fillable = ['authorization'];

    public function store()
    {
        return $this->belongsTo('App\B2BProject\Custom\Business\Store', 'store_id', 'id');
    }

    public function attachment()
    {
        return $this->belongsTo('App\B2BProject\AttachmentPrivateFiles', 'authorization', 'id');
    }
}
